Conditions | 2 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Relation from "../Relation"; |
||
23 | |||
24 | protected setParentProperties() { |
||
25 | super.setParentProperties(); |
||
26 | |||
27 | let name = ''; |
||
28 | for (const namePart of this.$name.split('_')) { |
||
29 | name += namePart[0].toUpperCase() + namePart.slice(1); |
||
30 | } |
||
31 | //TODO remove |
||
32 | Object.defineProperty(this.$parent, |
||
33 | `has${name}`, { |
||
34 | get: () => { |
||
35 | return this.value !== null; |
||
36 | }, |
||
37 | } |
||
38 | ) |
||
39 | |||
40 | return this; |
||
41 | } |
||
42 | } |